<%
    var obj={pageTitle:"商品分类列表"}
%>
{{include "../layout_header.html"}}
<div class="container">
        <div class=" page-header">
            <h2 class=" text-center text-primary">新增商品分类</h2>
        </div>
        <form action="/categoryInfo/doEditCategoryInfo?_csrf={{csrf}}" class=" form-horizontal" method="POST" id="editCategoryInfoForm">
            <input type="hidden" value="{{categoryInfo.categoryid}}" name="categoryid">
            <div class=" form-group">
                <label for="" class=" col-sm-2 control-label">分类名称</label>
                <div class=" col-sm-7">
                    <input name="categoryname" value="{{categoryInfo.categoryname}}" type="text" class=" form-control" data-rule-required="true"
                        placeholder="请输入分类名称">
                </div>
                <div class=" col-sm-3"></div>
            </div>
        
            <div class=" form-group">
                <div class="col-sm-7 col-sm-offset-2">
                    <button type="submit" class="btn btn-primary" id="btnSave">
                        <span class=" glyphicon glyphicon-floppy-saved"></span> 保存数据
                    </button>
                    <a href="/categoryInfo/list" class=" btn btn-danger">
                        <span class=" glyphicon glyphicon-chevron-left"></span> 返回列表
                    </a>
                </div>
            </div>
        </form>
    </div>
<script type="text/javascript">
    $(function(){
        $("#editCategoryInfoForm").validate({
            errorPlacement:function(error,element){
                error.appendTo(element.parent().next());
            },
            errorClass:"text-danger"
        });
        
    })
</script>

{{include "../layout_footer.html"}}